App = function(options){
	$.extend({},this.options,options);
	this.init();
};
App.prototype = {
	options:{
		
	},
	ctx:null,
	res:null,
	loading:null,
	mask:null,
	dialog:null,
	paging:null,
	audios:[],
	maskTarget:null,
	//---------------------------------------------------------------------------------------------//初始化
	init:function(){
		if(window!=window.top){
			this.maskTarget = window.top.document.body;
		}else{
			this.maskTarget = window.document.body;
		}
		this.ctx=window.ctx;
		this.res = window.res;
		this.mask = new Mask({target:this.maskTarget});
		this.loading = new Loading({target:this.maskTarget,img:this.res+"/default/images/loading/loading.gif"});
		this.dialog = new Dialog();
		this.initIframe();
	},
	registerEvent:function(){
		$(window).resize($.proxy(this.initIframe,this));
	},
	//---------------------------------------------------------------------------------------------//初始化iframe
	initIframe:function(){
		if(window.frameElement){
			window.frameElement.height = window.document.body.scrollHeight;
		}
	}
};
jQuery(function(){
	window.app = new App();
	window.broadcast = new Broadcast();
});